<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
  <th:block th:include="include :: header('自动部署管理')" />
</head>
<body class="gray-bg">
<div class="container-div" style="padding: 0px;">
  <div class="tabs-container">
    <ul class="nav nav-tabs">
      <li class="active"><a data-toggle="tab" href="#tab-1" aria-expanded="true"> Linux服务器</a></li>
      <li class=""><a data-toggle="tab" href="#tab-2" aria-expanded="false">CDN</a></li>
      <li class=""><a data-toggle="tab" href="#tab-3" aria-expanded="false">OSS</a></li>
    </ul>
    <div class="tab-content">
      <div id="tab-1" class="tab-pane active">
        <div class="panel-body" style="padding: 0px; margin: 0px;">
          <iframe class="RuoYi_iframe" name="iframe0" id="iframe0" width="100%" height="666px" th:src="@{/SSL/service}" frameborder="0" seamless></iframe>
        </div>
      </div>
      <div id="tab-2" class="tab-pane">
        <div class="panel-body" style="padding: 0px; margin: 0px;">
          <iframe class="RuoYi_iframe" name="iframe1" id="iframe1" width="100%" height="666px" th:src="@{/SSL/autoDeploy/CDN}" frameborder="0" seamless></iframe>
        </div>
      </div>
      <div id="tab-3" class="tab-pane">
        <div class="panel-body" style="padding: 0px; margin: 0px;">
          <iframe class="RuoYi_iframe" name="iframe2" id="iframe2" width="100%" height="666px" th:src="@{/SSL/autoDeploy/OSS}" frameborder="0" seamless></iframe>
        </div>
      </div>
    </div>
  </div>
</div>
<th:block th:include="include :: footer" />
<script th:inline="javascript">
  function addCdn(){
    $.modal.openTab("添加CDN证书自动部署任务",  ctx + "SSL/autoDeploy/addCdn", true);
  }

  function openDomainListPage(serIp, id){
    $.modal.openTab('服务器【'+serIp+'】域名列表', ctx+"SSL/domain1?serId="+id);
  }

  function addOSS(){
    $.modal.openTab("添加OSS证书自动部署任务",  ctx + "SSL/autoDeploy/addOSS", true);
  }
  function toSetTimePage(id){
    $.modal.openTab('设置续签过期时间', ctx + "SSL/autoDeploy/setTime/"+id, true);
  }
  function refreshTmp(){
    var activeLi = $('ul.nav.nav-tabs li.active');
    // 如果你只需要获取这个 <li> 的文本或索引，可以这样做：
    var activeLiIndex = $('ul.nav.nav-tabs li').index(activeLi); // 获取 <li> 在同级元素中的索引
    var iframe = document.getElementById('iframe'+activeLiIndex);
    iframe.contentWindow.refreshFun();
  }
</script>
</body>
</html>
